<?php

namespace App\Http\Controllers;


use App\Models\Resource;
use Illuminate\Support\Facades\DB;

class ResourceController extends Controller
{
    public function getList()
    {
        $resources = Resource::where('status', 'enabled')
            ->select('id', DB::raw('name as title'))
            ->get()
            ->toArray();
        return $resources;
    }
}